package bean;

public class CartItem {

	int cartItemId;
	int itemId;
	int itemQuantity;
	int userId;
	
	public CartItem() {
		
	}
	
	public void setCartItemId(int cartItemId) {
		this.cartItemId = cartItemId;
	}
	
	public void setItemId(int itemId) {
		this.itemId = itemId;
	}
	
	public void setItemQuantity(int itemQuantity) {
		this.itemQuantity = itemQuantity;
	}
	
	public void setUserId(int userId) {
		this.userId = userId;
	}
	
	public int getCartItemId() {
		return this.cartItemId;
	}
	
	public int getItemId() {
		return this.itemId;
	}
	
	public int getItemQuantity() {
		return this.itemQuantity;
	}
	
	public int getUserId() {
		return this.userId;
	}
	
	public String toString() {
		
		String result = new String();
		
			
		result = cartItemId+":#" + itemId+":#" + itemQuantity+":#" + userId;
		return result;
		
		
	}
	
	public static String convertArrayToString(CartItem[] aCI) {
		
		String result = null;
		
		
		for(int i=0;i<aCI.length;i++) {
			if(i==0) {
				result = aCI[i].toString();
			}
			else {
				result += "[]" + aCI[i].toString();
			}
		}
		
		return result;
	
	}
}